package me.android.library.ui.config;

import lombok.Data;
import lombok.EqualsAndHashCode;
import me.android.library.ui.api.MenuListener;
import me.android.library.ui.impl.DefaultMenuListener;
import mylab.utils.common.StringUtil;

/**
 * Created by sylar on 15/6/3.
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class MenuInfo extends BaseElement<MenuListener> {


    protected boolean valid = true;

    public MenuInfo() {
    }

    @Override
    public MenuListener get() {
        if (StringUtil.isEmpty(implClass)) {
            return new DefaultMenuListener();
        } else {
            return super.get();
        }
    }
}
